clc
clear
namePool = [0:2:12 13 14:2:40 41 42:2:70 71 72:2:96];
f = [0.0408:0.0408:0.2857 0.324 0.3265:0.0408:0.8571 0.87 0.898:0.0408:1.4694 1.482 1.5102:0.0408:2] * 1e12;



[Ip, Im, IT, IQ, IM] = FC_RadiativePower_U('.\SC\SC_',namePool, f);
YW_Plot_Fast_U({f / (1e12), Ip.Ip, f / (1e12), Im.Im, f / (1e12), IT.IT, f / (1e12), IQ.IQ, f / (1e12), IM.IM}, {'-o', '-d', '-v', '-s', '-^b'}, ["\fontsize{28}\fontname{Helvetica}\itP", '\fontsize{28}\fontname{Helvetica}\itM', '\fontsize{28}\fontname{Helvetica}\itT', '\fontsize{28}\fontname{Helvetica}\itQ_e', '\fontsize{28}\fontname{Helvetica}\itQ_m'], ["Frequency (THz)", 'Radiation   power(a.u.)']);
% set(gca, 'yscale', 'log');
YW_Plot_Fast_U({f / (1e12), IT.ITx, f / (1e12), IT.ITy, f / (1e12), IT.ITz, f / (1e12), IT.IT}, {'-o', '-d', '-v', '-s'}, ["\fontname{Helvetica}\itTx", '\fontname{Helvetica}\itTy', '\fontname{Helvetica}\itTz', '\fontname{Helvetica}\itT'], ...
    ["Frequency (THz)", 'Radiation   power (a.u.)']);
set(gca, 'yscale', 'log');
% saveRadiativePower = [f' Ip' Im' IT' IQ' IM'];
% saveRadiativePower = [f' Ip.Ip' Im.Im' IT.IT' IQ.IQ' IM.IM' IT.ITx' IT.ITy' IT.ITz'];
% SaveFile(saveRadiativePower,'Radative Power');


% namePool = 1:51;
% f= [1.82:0.002:1.92]*1e12;
% [Ip, Im, IT, IQ, IM] = FC_RadiativePower('.\Surface current-RCP-d30um\',namePool, f);
% YW_Plot_Fast({f / (1e12), Ip, f / (1e12), Im, f / (1e12), IT, f / (1e12), IQ, f / (1e12), IM}, {'-o', '-d', '-v', '-s', '-^b'}, ["\fontsize{28}\fontname{Helvetica}\itP", '\fontsize{28}\fontname{Helvetica}\itM', '\fontsize{28}\fontname{Helvetica}\itT', '\fontsize{28}\fontname{Helvetica}\itQ_e', '\fontsize{28}\fontname{Helvetica}\itQ_m'], ["Frequency (THz)", 'Radiation   power(a.u.)'])
% % set(gca, 'yscale', 'log');
% saveRadiativePower = [f' Ip' Im' IT' IQ' IM'];